#include <stdio.h>

//内存交换
void memchange(void *A, void *B, int len) {
    while (len--) {
        char tmp = *(char *) A;
        *(char *) A = *(char *) B;
        *(char *) B = tmp;
        A = (char *) A + 1;
        B = (char *) B + 1;
    }
}

int main() {
    int a = 0;
    int b = 0;
    printf("a=");
    scanf("%d", &a);
    printf("b=");
    scanf("%d", &b);
    printf("交换成功!\n");
    memchange(&a, &b, 4);
    printf("a=%d\nb=%d\n", a, b);
    return 0;
}